import request from '@/utils/request'

export function listAnimePage(query) {
  return request({
    url: '/anime/listPage',
    method: 'post',
    data: query
  })
}

export function deleteAnime(id) {
  return request({
    url: '/anime/delete',
    method: 'get',
    params: {
      id
    }
  })
}

export function createAnime(temp) {
  return request({
    url: '/anime/create',
    method: 'post',
    data: temp
  })
}

export function updateAnime(temp) {
  return request({
    url: '/anime/update',
    method: 'post',
    data: temp
  })
}

export function animeChart(chartType) {
  return request({
    url: '/anime/animeChart',
    method: 'get',
    params: {
      chartType
    }
  })
}
